<template>
    <div class="log_out" @click="logout">
        <el-button size="large" link>
            <SvgIcon name="logout" color="#fff" size="30" />
        </el-button>
        
    </div>
    <el-dialog v-model="visible"  title="提示" width="600">
            <span style="font-size: 16px;line-height: 1.5;">确定退出登录?</span>
            <template #footer>
                <div class="dialog-footer">
                    <el-button size="large" @click="visible=false">取消</el-button>
                    <el-button size="large" type="primary" @click="confirm">
                        确定
                    </el-button>
                </div>
            </template>
        </el-dialog>
</template>

<script setup lang="ts">
import {ref} from 'vue'
import {useRouter} from 'vue-router'
// import { useUserStore } from '@renderer/store/user'
// const userStore = useUserStore()
const visible = ref(false)
const router = useRouter()
function logout(){
    visible.value = true
}
function confirm(){
    console.log('confirm~')
    visible.value = false
   
    router.replace('/login')
}
</script>
<style lang="scss" scoped>
.log_out{
    margin-left: 10px;
}
</style>